/*
 * @Description: 
 * @Version: 2.0
 * @Autor: ftt
 * @Date: 2022-04-16 11:35:00
 * @LastEditors: TT
 * @LastEditTime: 2022-11-10 11:43:15
 */

import 'package:flutter/material.dart';

class NormalNoSplashFactory extends InteractiveInkFeatureFactory {
  const NormalNoSplashFactory();

  @override
  InteractiveInkFeature create({
    required MaterialInkController controller,
    required RenderBox referenceBox,
    required Offset position,
    required Color color,
    required TextDirection textDirection,
    bool containedInkWell = false,
    RectCallback? rectCallback,
    BorderRadius? borderRadius,
    ShapeBorder? customBorder,
    double? radius,
    VoidCallback? onRemoved,
  }) {
    return NormalNoSplash(
      controller: controller,
      referenceBox: referenceBox,
      color: color,
      onRemoved: onRemoved,
    );
  }
}

/// 不显示水波纹效果
class NormalNoSplash extends InteractiveInkFeature {
  NormalNoSplash({
    required MaterialInkController controller,
    required RenderBox referenceBox,
    required Color color,
    VoidCallback? onRemoved,
  }) : super(
          controller: controller,
          referenceBox: referenceBox,
          color: color,
          onRemoved: onRemoved,
        ) {
    controller.addInkFeature(this);
  }

  @override
  void paintFeature(Canvas canvas, dynamic transform) {}
}
